package com.example.demo.controller;

import com.example.demo.feignInterface.FeignInterfaceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yinyonggang on 2018/7/25.
 */
@RestController
@RequestMapping("feign")
public class FeignController {

    @Autowired
    private FeignInterfaceClient feignInterfaceClient;
    
    @RequestMapping("/first")
    public String getSentence() {
    	String getStr = feignInterfaceClient.getRequest();
    	System.out.println("zookeeper feign controller!");
    	System.out.println("feign request response!" + getStr);
        return getStr;
    }
}
